import {createStore} from  "redux";

function  reducer(state,action){
  if(action.type == 'add') return state + 1;
  if(action.type =='del') return  state -1;
  return  state;
}

const action = {type:'del'};


let store = createStore(reducer,10)

console.log(store.getState());

store.dispatch(action);

console.log(store.getState());
